package com.moore.mapper;

import com.moore.bean.Admin;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminMapper {

    List<Admin> login(@Param("account") String account, @Param("password") String password);

    int updatePassword(@Param("id") long id, @Param("password") String password, @Param("oldPassword") String oldPassword);

    List<Admin> getAllAdmin(@Param("admin") Admin admin);

    int getAdminCount(@Param("admin") Admin admin);

    int addAdmin(@Param("admin") Admin admin);

    int updateAdmin(@Param("admin") Admin admin);

    int adminSetStatus(@Param("id") long id, @Param("status") String status);

    int deleteAdmin(@Param("id") long id);

    int resetPassword(@Param("id") long id);
}
